/**
 * user_info.jsp js
 */

function bindEmail(path){
	console.log(path+"sd");
}


/* 点击解绑 */
function reverseBind(path,tp) {
	reset();
	alertify.confirm("确定解除绑定吗？", function(e) {
		if (e) {
			if(tp=='email'){
//				alertify.success('email');
				reverseEmail(path,$("#uuid").val());
			}else{
				alertify.success('phone');
			}
		} else {
			alertify.error(noMsg);
			return false;
		}
	});
}

/**
 * 解绑邮箱
 * @param email
 */
function reverseEmail(path,id){
	$.ajax({
		type : "post", 
		url : path+"user_reverseEmail.action",
		data:{
			uuid:id
		},
		dataType : 'json', 
		success : function(result) {
			if(result.success){ 
				window.location.reload();
				alertSuccess("解绑邮箱成功");
			}else{
				alertError("解绑邮箱失败");
			}
		}
	});
}

